<template>
    <page-list ref="pageList" v-if="currentPage == 'list'" @change="changePage('form')"/>
    <page-form ref="pageForm" v-else @change="changePage('list')"/>
</template>

<script setup lang="ts">
import { ref, reactive, getCurrentInstance, nextTick, defineAsyncComponent } from 'vue';
const PageList = defineAsyncComponent(() => import('./list/index.vue'));
const PageForm = defineAsyncComponent(() => import('./form/index.vue'));

const currentPage = ref('list');
console.log(currentPage.value)
const changePage = (page:string) => {
      currentPage.value = page;
}

</script>

<style>

</style>